package com.linovi.stringbuilder

class LinkedList {
  var head: Node = null
  var tail: Node = null
  var counter: Int = 0

  def add(element: Node): Unit =
    {
      if (head == null) {
        head = element
        tail = element
      }
      else {
        tail.next = element
        tail= element
      }
      counter += 1
    }
}
